package 设计模式.p_观察者模式;

/**
 * @author caihe
 * @date 2023/3/21 15:52
 */
public class Test {


    public static void main(String[] args) {
        Child child = new Child();
        Farmers farmers = new Farmers();
        
        Weather weather = new Weather();
        weather.addObserver(child);
        weather.addObserver(farmers);
        
        weather.timePasses();
        weather.timePasses();
        weather.timePasses();
        

    }
}
